package itsm.isperp.module.dto.project;

/**
 * 
 * 
 * 
 * @author lizx
 * @date 2013-12-1
 * @since 1.0
 * 
 */
public class ProjectDomain {

	public static final String PROJECT_ID = "project_id";

	public enum ProjectDomainType {

		Person(1), Technology(11), Management(111), Company(1111);

		private Integer value;

		private ProjectDomainType(int value) {
			this.value = value;
		}

		@Override
		public String toString() {
			return value.toString();
		}

		public int getValue() {
			return this.value;
		}

	}

	String column;

	ProjectDomainType type;

	public String getColumn() {
		return column;
	}

	public void setColumn(String column) {
		this.column = column;
	}

	public ProjectDomainType getType() {
		return type;
	}

	protected ProjectDomain(ProjectDomainType type) {
		this(PROJECT_ID, type);
	}

	protected ProjectDomain(String column, ProjectDomainType type) {
		this.column = column;
		this.type = type;
	}

	public static final ProjectDomain newInstance() {
		return new ProjectDomain(ProjectDomainType.Technology);

	}

	public static final ProjectDomain newInstance(ProjectDomainType type) {
		return new ProjectDomain(type);

	}

	public static final ProjectDomain newInstance(String column,
			ProjectDomainType type) {
		return new ProjectDomain(column, type);

	}

}
